From: Dongxiao Xu Date: Thu, 6 Dec 2012 16:56:49 +0000 (+0000) Subject: nested vmx: fix DR access VM exit X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7550 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=4a069acdbdc89bafca1da3c88830d97d5105c296;p=xen.git nested vmx: fix DR access VM exit For DR register, we use lazy restore mechanism when access it. Therefore when receiving such VM exit, L0 should be responsible to switch to the right DR values, then inject to L1 hypervisor. Signed-off-by: Dongxiao Xu Acked-by: Jan Beulich Committed-by: Keir Fraser --- diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index dab9551358..02a7052234 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1641,7 +1641,8 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs, break; case EXIT_REASON_DR_ACCESS: ctrl = __n2_exec_control(v); - if ( ctrl & CPU_BASED_MOV_DR_EXITING ) + if ( (ctrl & CPU_BASED_MOV_DR_EXITING) && + v->arch.hvm_vcpu.flag_dr_dirty ) nvcpu->nv_vmexit_pending = 1; break; case EXIT_REASON_INVLPG: